﻿using System.Collections.Generic;
using System.Linq;

namespace CsvImporter
{
  internal class TableGenerator
  {
    internal static IEnumerable<string[]> GenerateTable(string[] lines)
    {
      //var table = new List<string[]>();
      //foreach (var line in lines)
      //{
      //  table.Add(line.SplitByComma());
      //}
      //return lines.Select(line => line.SplitByComma()).ToList();
      
      //foreach (var line in lines)
      //{
      //  yield return line.SplitByComma();
      //}
      return lines.Select(line => line.SplitByComma());
    }
  }
}
